abstract class BaseSide {
    protected _instance: HTMLElement
    protected _child: Array<HTMLElement>
    protected _root: HTMLElement
    abstract init(root: HTMLElement, className: string): void
    abstract addChild(item: HTMLElement): BaseSide
    abstract getInstance(): HTMLElement
}
export class NavWrapper extends BaseSide {
    constructor(root: HTMLElement, className: string = "") {
        super()
        this._root = root
        this.init(root, className);
    }
    init(root: HTMLElement, className: string): void {
        if (this instanceof NavWrapper) {
            this._instance = document.createElement("ul");
            this._instance.className = className;
            this._root.appendChild(this._instance);
        } else {
            new NavWrapper(root, className);
        }
    }
    addChild(item: HTMLElement): NavWrapper {
        this._child.push(item);
        this._instance.appendChild(item);
        return this;
    }
    getInstance(): HTMLElement {
        return this._instance;
    }

}
export class NavItem extends BaseSide {
    constructor(root: HTMLElement,className: string = "") {
        super()
        this._root = root
        this.init(root, className);
    }
    init(root: HTMLElement, className: string): void {
        if (this instanceof NavItem) {
            this._instance = document.createElement("li");
            this._instance.className = className;
            this._root.appendChild(this._instance);
        } else {
            new NavItem(root, className);
        }
    }
    addChild(item: HTMLElement): NavItem {
        this._child.push(item);
        this._instance.appendChild(item);
        return this;
    }
    getInstance(): HTMLElement {
        throw new Error("Method not implemented.")
    }
}
